package com.jwcao.common.cast.operation.callback;

import com.jwcao.common.scan.object.ScanClass;

/**
 * name: FromCallBack description: TODO
 *
 * @author caojingwei date: 2023/3/23 19:16
 */
public class FromCallBackOperation {

    private final ScanClass targetClass;
    private final String methodName;

    public FromCallBackOperation(ScanClass targetClass, String methodName) {
        this.targetClass = targetClass;
        this.methodName = methodName;
    }

    public void execute(Object target) {
        targetClass.invokeVoidMethod(target, methodName);
    }
}
